/*
 * Created on Nov 28, 2004
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package org.vectrics.recruiter.struts.tag;

import java.util.List;

import org.vectrics.common.pagelist.PageList;
import org.vectrics.recruiter.RecruitServiceLocator;
import org.vectrics.recruiter.user.InterviewCriteria;
import org.vectrics.user.Person;

/**
 * @author mmoore
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class PersonInterviewPageList extends PageList {
	private Person candidate = null;
	
	public PersonInterviewPageList(InterviewCriteria criteria) {
		this.setCriteria(criteria);
	}
	
	/* (non-Javadoc)
	 * @see org.vectrics.common.pagelist.PageList#getTotalElementCount()
	 */
	public int getTotalElementCount() {
		int size = RecruitServiceLocator.getRecruitUserService().findInterviewCount((InterviewCriteria)getCriteria());
		return(size);
	}

	/* (non-Javadoc)
	 * @see org.vectrics.common.pagelist.PageList#getElements(int, int)
	 */
	public List getElements(int start, int end) {
		List elements = RecruitServiceLocator.getRecruitUserService().findInterviews((InterviewCriteria)getCriteria(), 
				start, end);
		return(elements);
	}

}
